package top.zackyoung.bbs.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author: ZackYoung
 * @time: 2020/11/13
 */
public class RenameUtil {
    public static String toDate() {
        // 格式化时间
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
        String nowDate = sdf.format(new Date());
        return nowDate;
    }
    public static String toFileDate() {
        // 格式化时间
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy\\MM\\ddHHmmss");
        String nowDate = sdf.format(new Date());
        return nowDate;
    }


}
